<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>报名人数统计图</title>
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
<%
    response.setHeader("refresh","5");
%>
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '报名人数统计图'
        },
        tooltip: {},
        legend: {
            data:['报名人数']
        },
        xAxis: {
            data: ["总数","男生","女生"]
        },
        yAxis: {},
        series: [{
            name: '人数',
            type: 'bar',
            data: [<%=application.getAttribute("count")%>, <%=application.getAttribute("boy")%>, <%=application.getAttribute("girl")%>]
        }]
    };
    myChart.setOption(option);
</script>
</body>
</html>